﻿#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cassert>
using namespace std;
class Date
{
	friend void operator<<(ostream& out, const Date& d);
public:
	Date(int year = 8, int month = 9, int day = 10)
		:_year(1)
		, _month(_year)
		, _day(3)
	{
		cout << "Date(...)" << endl;
	}
	void print()const
	{
		cout << _month << endl;
	}
private:
	int _month;
	int _day;
	int _year;
};
class hello
{
public:
	hello()
		:_d()
	{
		cout << "hello()" << endl;
	}
	hello* operator&()
	{
		cout << "小丑取不出地址" << endl;
		return (hello*)0;
	}
private:
	Date _d;
};

void operator<<(ostream& out, const Date& d)
{
	out << d._year << "/" << d._month << "/" << d._day << endl;
}
int main()
{
	Date d1;
	cout << d1;
	hello h;
	cout << &h;
	d1.print();
	return 0;
}